package pl.prv.polanie.client.widgets;

import com.google.gwt.user.client.ui.FocusListener;
import com.google.gwt.user.client.ui.PasswordTextBox;
import com.google.gwt.user.client.ui.Widget;

public class PasswordTextBoxStyled extends PasswordTextBox {
	
	private static final String STYLE_TEXTBOX_STYLED_FOCUSED = "plan-TextBox-Styled-focused";
	
	public PasswordTextBoxStyled() {
		super();
		
		addFocusListener(new FocusListener() {
			public void onFocus(Widget sender) {
				addStyleName(STYLE_TEXTBOX_STYLED_FOCUSED);
			}
			
			public void onLostFocus(Widget sender) {
				removeStyleName(STYLE_TEXTBOX_STYLED_FOCUSED);
				
			}
		});
	}

}
